<template>
  <div id="userLayout" :class="['user-layout-wrapper', device]">

    <div class="container">


      <route-view></route-view>

    </div>
    <!-- <div class="loginBgVideo">

    </div> -->
    <div class="footer">
      <div class="links">
<!--        <a>版权所有：内蒙古自治区应急管理厅政策法规处</a>-->
<!--
        <a>技术支持：北京慧辰资道资讯股份有限公司</a>
-->
      </div>
<!--      <div class="copyright">-->
<!--        Copyright-->
<!--        <a-icon type="copyright"/>-->
<!--        2021 <span>xxxxxxxxxxx</span>-->
<!--      </div>-->
    </div>

  </div>
  </div></template>

<script>
  import RouteView from '@/components/layouts/RouteView'
  import { mixinDevice } from '@/utils/mixin.js'
  import videojs from 'video.js'

  export default {
    name: 'UserLayout',
    components: { RouteView },
    mixins: [mixinDevice],
    data () {
      return {}
    },
    created() {
      //this.initVideo()
    },
    mounted () {
      document.body.classList.add('userLayout')
    },
    methods: {
      initVideo() { // 此处初始化的调用，我放在了获取数据之后的方法内，而不是放在钩子函数mounted
        // 页面dom元素渲染完毕，执行回调里面的方法
        this.$nextTick(() => {
          let myPlayer = this.$video(document.getElementById('myVideo'), {
            poster: '../../assets/loginBg.jpg',
            controls: false,
            autoplay: true,
            loop: true,
            preload: 'auto',
            controlBar: {
              playToggle: true
            }
          })
        })
      }
    },
    beforeDestroy () {
      document.body.classList.remove('userLayout')
    }
  }
</script>

<style lang="less" scoped>
  #userLayout.user-layout-wrapper {
    height: 100vh;
    position: relative;

    &.mobile {
      .container {
				height: 100vh;
        .main {
          width: 460px;
        }
      }
    }
    .loginBgVideo {
      width: 100%;
      height: 920px;
      background-image: url('../../assets/img/checkcode.png');
			background-position: 55%;
			background-repeat: no-repeat;
    }
    .container {
			position: relative;
      width: 100%;
      height: 100vh !important;
			background: url(../../assets/img/checkcode.png) 50% 50% no-repeat;
			background-size: cover;

      a {
        text-decoration: none;
      }

      .top {
        .header {
          // height: 76px;
          line-height: 76px;
			text-align: center;

          .badge {
            position: absolute;
            display: inline-block;
            line-height: 1;
            vertical-align: middle;
            margin-left: -12px;
            margin-top: -10px;
            opacity: 0.8;
          }

          .logo {
            /* width: 102px;
            height: 76px; */
            vertical-align: top;
            margin-right: 12px;
            border-style: none;
						width: 1000px;
          }

          .title {
            font-size: 56px;
            line-height: 76px;
            color: #3477FF;
            font-family: "Chinese Quote", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
            font-weight: 600;
            position: relative;
          }
        }
        .desc {
          font-size: 14px;
          color: rgba(0, 0, 0, 0.45);
          margin-top: 12px;
          margin-bottom: 40px;
        }
      }

      .main {
				position:absolute;
        width: 600px;
        height: 540px;
				top: 50%;
				left: 50%;
				transform: translate(-50%,-50%);
        margin: 0 auto;
				padding: 42px 84px 0 84px;
        background: #fff;
				border-radius: 8px;
        z-index: 1;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.4) 100%);
				box-shadow: 0px 2px 4px 0px #577296;
				border-radius: 10px;
				backdrop-filter: blur(6px);
      }
    }
  }
  .footer {
    position: absolute;
    bottom: 120px;
    width: 700px;
    left: 50%;
    margin-left: -350px;
    padding: 0 16px;
    text-align: center;

    .links {
      margin-bottom: 8px;

      a {
        font-size: 14px;
        color: #8a96a9;
        &:not(:last-child) {
          margin-right: 40px;
        }
      }
    }
    .copyright {
      font-size: 14px;
      font-weight: 500;
      color: #FFFFFF;
    }
  }
</style>
